package com.jiyun.Games.controller;

import com.domain.Inform;
import com.jiyun.Games.service.IInformService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author sy
 * @since 2024-12-18
 */
@RestController
@RequestMapping("/inform")
@CrossOrigin
public class InformController {

    private final IInformService informService;

    public InformController(IInformService informService) {
        this.informService = informService;
    }

    @GetMapping("/list")
    public List<Inform> list() {
        return informService.list();
    }
}
